package tk.leafotto.ssm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.leafotto.ssm.beans.CamInfo;
import tk.leafotto.ssm.dao.CamInfoMapper;

import java.util.List;

@Service
public class CamInfoService {
    @Autowired
    CamInfoMapper camInfoMapper;

    public List<CamInfo> getCamInfo() {
        return camInfoMapper.getCamInfo();
    }

    public CamInfo getCamInfo(Integer id) {
        return camInfoMapper.selectCamInfo(id);
    }

    public int putCamInfo(CamInfo camInfo) {
        camInfoMapper.putCamInfo(camInfo);
        return camInfo.getId();
    }

    public int setAllowTime(CamInfo camInfo) {
        return camInfoMapper.setAllowTime(camInfo);
    }
}
